package com.example.mallmember.controller;

import com.example.mallmember.pojo.TMember;
import com.example.mallmember.service.IMemberService;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

@RestController
@RequestMapping("/member")
public class MemberController {
	@Resource
	IMemberService memberService;

	@GetMapping("/test")
	public String test(){
		return "调用到了";
	}

	@PostMapping("/save")
	public Boolean save(){
		TMember tMember = new TMember();
		tMember.setName("member");
		tMember.setAge(18);

		boolean save = memberService.save(tMember);
		return save;
	}
}
